﻿Public Class Ndepartamento
    Private objdepartamento As Datos.DDepartamento

    Public Sub New()
        objdepartamento = New Datos.DDepartamento
    End Sub

    Public Function buscardepartamento(ByVal texto As String) As DataTable
        Dim oDatos As New Datos.DDepartamento
        Try
            Return oDatos.buscardepartamento(texto)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try

    End Function


    Public Function guardardepartamento(ByVal item As Entidades.Edepartamento) As Boolean
        Dim oDatos As New Datos.DDepartamento
        Dim oDepartamento As New List(Of Entidades.Edepartamento)
        Dim band As Boolean
        Try
            band = oDatos.guardar(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function modificardepartamento(ByVal departamento As Entidades.Edepartamento) As Boolean
        Dim oDatos As New Datos.DDepartamento
        Dim oDepartamento As New List(Of Entidades.Edepartamento)
        Dim band As Boolean
        Try
            band = oDatos.modificar(departamento)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function
End Class
